trollixx / qtcreator-tabbededitor-plugin

Qt Creator Tabbed Editor Plugin
GNU Lesser General Public License v3.0
73 stars 37 forks source link

Fix wrong tab caption that appears when editing documents in swapped tabs #12

Closed kodemeister closed 9 years ago

kodemeister commented 9 years ago

Steps to reproduce:

  1. Open two files, say 1.txt and 2.txt.
  2. Swap tabs on tabbar so the first tab becomes 2.txt followed by 1.txt.
  3. Type smth in 2.txt.

Expected behavior: tab caption of 2.txt changes to 2.txt* (with asterisk). Real behavior: tab caption of 1.txt changes to 2.txt*.

This happens since Core::IDocument::changed signal handler captures tab index used at tab creation. When tabs are reordered by the user, this index becomes invalid but lambda still uses old captured value. I've prepared a simple fix for this issue, please review and apply it.

trollixx commented 9 years ago

Merged, thanks!