1064:4c7a353cf583 | 1065:c8ecddbd99e9 |
---|---|
252 } | 252 } |
253 | 253 |
254 void ViewToolset::jumpTo() | 254 void ViewToolset::jumpTo() |
255 { | 255 { |
256 bool ok; | 256 bool ok; |
257 int defaultValue = (length(selectedObjects()) == 1) ? selectedObjects()[0]->lineNumber() : 0; | 257 int defaultValue = (countof(selectedObjects()) == 1) ? selectedObjects()[0]->lineNumber() : 0; |
258 int index = QInputDialog::getInt (nullptr, "Go to line", "Go to line:", defaultValue, 1, currentDocument()->getObjectCount(), 1, &ok); | 258 int index = QInputDialog::getInt (nullptr, "Go to line", "Go to line:", defaultValue, 1, currentDocument()->getObjectCount(), 1, &ok); |
259 | 259 |
260 if (ok) | 260 if (ok) |
261 { | 261 { |
262 LDObject *object = currentDocument()->getObject(index - 1); | 262 LDObject *object = currentDocument()->getObject(index - 1); |