Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.6.1
-
Windows 7, 8, 10
Description
The following snippet creates a QUndoStack with 3 undo commands and a QUndoView.
If you build this example with Qt 5.4.1, clicking on 'command 3' causes only command 3 to be selected (correct).
If you build this example with Qt 5.6.1, clicking on 'command 3' causes all items in the view to be selected (incorrect).
Regression introduced in Qt 5.6.x or possibly Qt 5.5.x.
See attached screenshots.
#include <QtGui> #include <QtWidgets> struct Command : public QUndoCommand { Command(const QString &text) : QUndoCommand(text) {} void undo() { qDebug() << "undo " + text(); } void redo() { qDebug() << "redo " + text(); } }; int main(int argc, char *argv[]) { QApplication app(argc, argv); QUndoStack stack; stack.push(new Command("command 1")); stack.push(new Command("command 2")); stack.push(new Command("command 3")); QUndoView view(&stack); view.show(); return app.exec(); }
Attachments
Issue Links
- relates to
-
QTBUG-18009 Extended selection with Shift in QAbstractItemView fails if rows are added/removed/resorted
- Open