-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow changing order of open document tabs #640
Conversation
Hmm, there was some reason that I didn't enable this like that. Are you sure everything is working correctly with that change? |
If I recall correctly, the either the saving of the documents or the restoring order when restarting tiled was a problem in the discussion we had years ago. |
I didn't notice that it wasn't restoring the modified tab order when restarting. I added a method to reset the ordering of the open documents list. Qt doesn't seem to have any way to respond to a tab reorder event when using QTabWidget so I set it to update whenever the tabs may have been changed since last access (closing the program, closing a tab, switching tabs). |
Hmm, this looks a little brute-force to me. Could you try to make a |
void DocumentManager::documentTabMoved(int from, int to) | ||
{ | ||
MapDocument* mapDocument = mDocuments.takeAt(from); | ||
mDocuments.insert(to, mapDocument); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be able to use mDocuments.move(from, to)
.
Allow changing order of open document tabs
Thanks, @sean-h! |
Allows a user to reorder open document tabs; closes #407 .