View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000991 | Scribus | User Interface | public | 2004-08-23 19:16 | 2004-08-24 22:31 |
| Reporter | jo-hannes | Assigned To | fschmid | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | AMD Athlon 1000MHz | OS | Suse Linux | OS Version | 9.1 |
| Summary | 0000991: layer selector doesnt reflect the order of the layers | ||||
| Description | add some layers, change their level. layer selector should change them too, but doesnt. | ||||
| Tags | No tags attached. | ||||
| Attached Files | scribusview.cpp.diff (1,550 bytes)
--- scribusview.cpp.orig 2004-08-24 01:45:47.000000000 +0200
+++ scribusview.cpp 2004-08-24 01:45:09.000000000 +0200
@@ -562,33 +562,43 @@
void ScribusView::LaMenu()
{
uint a;
- int Lnr;
- struct Layer ll;
- ll.LNr = 0;
+ QValueList<Layer>::iterator it;
Laymen->clear();
if (Doc->Layers.count() != 0)
{
- Lnr = 0;
- for (a=0; a < Doc->Layers.count(); a++)
+ for (a=0; a < Doc->Layers.count(); a++)
{
- Level2Layer(Doc, &ll, Lnr);
- Laymen->insertItem(Doc->Layers[ll.LNr].Name);
- if (Doc->ActiveLayer == static_cast<int>(ll.LNr))
- Laymen->setItemChecked(Laymen->idAt(a), true);
- Lnr++;
+ int curr,n=0;
+ for (it = Doc->Layers.begin(); it != Doc->Layers.end(); ++it,n++)
+ {
+ if (Doc->Layers.count()-(*it).Level-1 == a)
+ {
+ Laymen->insertItem((*it).Name);
+ if (Doc->ActiveLayer == n){
+ curr=Doc->Layers.count()-(*it).Level-1;
+ }
+ }
+ }
+ Laymen->setItemChecked(Laymen->idAt(curr), true);
}
}
}
void ScribusView::GotoLa(int l)
{
- int d = Laymen->indexOf(l);
- struct Layer ll;
- ll.LNr = 0;
- Level2Layer(Doc, &ll, d);
- Doc->ActiveLayer = ll.LNr;
- LY->setText(Doc->Layers[ll.LNr].Name);
- emit changeLA(ll.LNr);
+ int a=0;
+ int d = Doc->Layers.count()-Laymen->indexOf(l)-1;
+ QValueList<Layer>::iterator it;
+ for (it = Doc->Layers.begin(); it != Doc->Layers.end(); ++it,a++)
+ {
+ if ( d == (*it).Level )
+ {
+ Doc->ActiveLayer = a;
+ LY->setText(Doc->Layers[a].Name);
+ emit changeLA(a);
+ break;
+ }
+ }
}
void ScribusView::GotoPa(int Seite)
| ||||
| Patch | |||||
|
|
Layers are in reverse order in the list. Makes sense to have them in the order they exist on the page. |
|
|
here is my patch, which has correct layer order. Please note I started it before the patch for this bug appeared, so it does not use Level2Layer. However, here it works. |
|
|
Tested. Fixed. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2004-08-23 19:16 | jo-hannes | New Issue | |
| 2004-08-23 21:46 | fschmid | Status | new => resolved |
| 2004-08-23 21:46 | fschmid | Resolution | open => fixed |
| 2004-08-23 21:46 | fschmid | Assigned To | => fschmid |
| 2004-08-24 12:36 | cbradney | Status | resolved => feedback |
| 2004-08-24 12:36 | cbradney | Resolution | fixed => reopened |
| 2004-08-24 12:36 | cbradney | Note Added: 0002202 | |
| 2004-08-24 12:36 | cbradney | Relationship added | has duplicate 0000994 |
| 2004-08-24 16:57 | fredd | File Added: scribusview.cpp.diff | |
| 2004-08-24 17:00 | fredd | Note Added: 0002213 | |
| 2004-08-24 21:40 | fschmid | Status | feedback => resolved |
| 2004-08-24 21:40 | fschmid | Resolution | reopened => fixed |
| 2004-08-24 22:31 | cbradney | Status | resolved => closed |
| 2004-08-24 22:31 | cbradney | Note Added: 0002220 | |
| 2006-05-18 23:10 | christoph_s | Relationship added | child of 0003838 |